package com.java.test;

public class Father {
    public void print(){
        System.out.println("我是父类");
    }
}
class Son extends Father {
    @Override
    public void print() {
        System.out.println("我是子类方法");
    }
}

class Test {
    public static void main(String[] args) {
        Father father = new Father();
        father.print();//我是父类
    }
}
